package com.seven.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.seven.exception.MyException;

@RestController
public class HelloController {

	private final static Logger logger = LoggerFactory.getLogger(HelloController.class);
	
	@GetMapping("/hello")
    public String index() throws MyException {
		logger.info("进行hello的请求");
		
		throw new MyException("发生错误2");
    }
}
